home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sun Solutions 1997 April to September
/
Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso
/
products
/
IST
/
_install
/
SparcSolaris
/
install.sysedit
next >
Wrap
Text File
|
1997-01-23
|
4KB
|
149 lines
#! /bin/ksh
# This is the install file for Sparc Solaris 2.1 or greater
# Get and display host name
HOSTNAME=`uname -n`
export HOSTNAME
# If /usr/local/IST exists this may wipe out the current install!
oktorun=1;
if [[ $LOGNAME = "root" && -w /opt ]]
then
ISTHOME=/opt/IST;
export ISTHOME;
INSTALL_TYPE="root";
else
ISTHOME=$HOME/IST;
export ISTHOME;
INSTALL_TYPE="user";
fi
# If $ISTHOME exists this may wipe out the current install!
if [ -d $ISTHOME ]
then
echo ">>> The $ISTHOME directory already exists! Ok to overwrite? (Y to continue)"
read ans;
if [[ $ans == "Y" || $ans == "y" ]]
then
oktorun=1;
else
exit 1;
fi
fi
# Insure the /opt/IST directories are are there
if [[ ! -d $ISTHOME ]]
then
mkdir $ISTHOME
chmod 777 $ISTHOME
fi
echo "#########################################################"
echo "#########################################################"
echo "### SysEdit Install Script for Sparc Solaris 2.x ###"
echo "#########################################################"
echo "#########################################################"
echo "###### Install SysEdit HELP File ######"
if [ -f $ISTHOME/ISTSE.HELP ]
then
mv $ISTHOME/ISTSE.HELP $ISTHOME/ISTSE.HELP.old
fi
cp $COMPANY_DIR/_demos/SparcSolaris/ISTSE.HELP.Z $ISTHOME/.
if [[ ! -f $ISTHOME/LICENSE.$HOSTNAME && ! -f $ISTHOME/LICENSE.$LOGNAME ]]
then
echo "###### Install LICENSE File ######"
if [[ $INSTALL_TYPE = "root" ]]
then
cp $COMPANY_DIR/_demos/SparcSolaris/LICENSE.demohost.Z $ISTHOME/LICENSE.$HOSTNAME.Z;
touch $ISTHOME/.RUNNING.$HOSTNAME;
chmod 666 $ISTHOME/.RUNNING.$HOSTNAME;
else
cp $COMPANY_DIR/_demos/SparcSolaris/LICENSE.demohost.Z $ISTHOME/LICENSE.$LOGNAME.Z;
fi
fi
echo "###### INSTALL Default ISTSE.termtype files ######"
if [ ! -f $ISTHOME/ISTSE.xterm ]
then
cp $COMPANY_DIR/_demos/SparcSolaris/ISTSE.xterm.Z $ISTHOME/.
fi
if [ ! -f ISTSE.sun-cmd ]
then
cp $COMPANY_DIR/_demos/SparcSolaris/ISTSE.sun-cmd.Z $ISTHOME/.
fi
echo "###### Install sample setup files ######"
cp $COMPANY_DIR/_demos/SparcSolaris/sample*_SparcSol2* $ISTHOME/.
echo "###### Install tutorial files ######"
cp $COMPANY_DIR/_demos/SparcSolaris/tutorial* $ISTHOME/.
echo "###### Install Product ID file ######"
cp $COMPANY_DIR/_demos/SparcSolaris/SysEdit* $ISTHOME/.
cp $COMPANY_DIR/_demos/SysEdit* $ISTHOME/.
echo "###### Install SysEdit man page ######"
if [ -f $ISTHOME/se.l ]
then
mv $ISTHOME/se.l $ISTHOME/se.l.old
fi
cp $COMPANY_DIR/_demos/SparcSolaris/se.l.Z $ISTHOME/.
cp $COMPANY_DIR/_text/manpage.txt $ISTHOME/Manpage
uncompress $ISTHOME/se.l.Z
echo "###### Install executables for Sparc Solaris 2.x ######"
if [ -f $ISTHOME/se ]
then
mv $ISTHOME/se $ISTHOME/se.old
fi
cp $COMPANY_DIR/_demos/SparcSolaris/se_SparcSol2.Z $ISTHOME/se.Z
if [ -f $ISTHOME/see ]
then
mv $ISTHOME/see $ISTHOME/see.old
fi
cp $COMPANY_DIR/_demos/SparcSolaris/se_SparcSol2.Z $ISTHOME/see.Z
if [ -f $ISTHOME/se_setup ]
then
mv $ISTHOME/se_setup $ISTHOME/se_setup.old
fi
cp $COMPANY_DIR/_demos/SparcSolaris/se_setup_SparcSol2.Z $ISTHOME/se_setup.Z
echo "###### Uncompress Files ######"
uncompress $ISTHOME/*.Z
if [[ INSTALL_TYPE = "root" ]]
then
if [ ! -f /usr/bin/se ]
then
echo "###### Creating symbolic link /usr/bin/se ######"
ln -s $ISTHOME/se /usr/bin/se
fi
if [ ! -f /usr/bin/see ]
then
echo "###### Creating symbolic link /usr/bin/see ######"
ln -s $ISTHOME/see /usr/bin/see
fi
if [ ! -f /usr/bin/se_setup ]
then
echo "###### Creating symbolic link /usr/bin/se_setup ######"
ln -s $ISTHOME/se_setup /usr/bin/se_setup
fi
fi
echo "###### SysEdit is Installed ######"
echo "###### ######"
echo "###### Type: $ISTHOME/se [filename] to start"
echo "###### SysEdit or place $ISTHOME"
echo "###### in your path and enter se [filename] ######"
echo "###### ######"
echo "#########################################################"
echo "#########################################################"